<?php
if (!defined('TYPO3_MODE')) {
	die ('Access denied.');
}

if(!defined($_EXTKEY)) $_EXTKEY = 'mfwc_volunteer';

$tempColumns = array(
	'birthday' => array(		
		'exclude' => 0,		
		'label' => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.birthday',		
		'config' => array(
			'type'     => 'input',
			'size'     => '8',
			'max'      => '20',
			'eval'     => 'date',
			'checkbox' => '0',
			'default'  => '0'
		)
	),
	'tx_mfwcvolunteer_id' => array(		
		'exclude' => 0,		
		'label' => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_id',		
		'config' => array(
			'type' => 'input',	
			'size' => '30',
		)
	),
	'tx_mfwcvolunteer_status' => array(		
		'exclude' => 0,		
		'label' => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_status',		
		'config' => array(
			'type' => 'radio',
			'items' => array(
				array('LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_status.I.0', '0'),
				array('LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_status.I.1', '1'),
				array('LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_status.I.2', '2'),
			),
		)
	),
	'tx_mfwcvolunteer_experience' => array(		
		'exclude' => 0,		
		'label' => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_experience',		
		'config' => array(
			'type' => 'radio',
			'items' => array(
				array('LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_experience.I.0', '0'),
				array('LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_experience.I.1', '1'),
			),
		)
	),
	'tx_mfwcvolunteer_skills' => array(		
		'exclude' => 0,		
		'label' => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_skills',		
		'config' => array(
			'type' => 'text',
			'cols' => '30',	
			'rows' => '5',
		)
	),
	
	'tx_mfwcvolunteer_department' => array(		
		'exclude' => 0,		
		'label' => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_department',		
		'config' => array(
			'type' => 'select',
			'foreign_table' => 'tx_mfwcvolunteer_departments',
			'foreign_table_where' => ' ORDER BY tx_mfwcvolunteer_departments.uid ASC',
			'size' => 1,
		)
	),
	
	'tx_mfwcvolunteer_jobs' => array(		
		'exclude' => 0,		
		'label' => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_jobs',		
		'config' => array(
			'type' => 'select',
			'foreign_table' => 'tx_mfwcvolunteer_jobs',
			'foreign_table_where' => ' ORDER BY tx_mfwcvolunteer_jobs.uid ASC',
			'size' => 1,
		)
	),
	
	'tx_mfwcvolunteer_responsibilities' => array(		
		'exclude' => 0,		
		'label' => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.tx_mfwcvolunteer_responsibilities',		
		'config' => array(
			'type' => 'text',
			'cols' => '30',	
			'rows' => '5',
		)
	),
);


t3lib_div::loadTCA('fe_users');
t3lib_extMgm::addTCAcolumns('fe_users',$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes('fe_users','birthday','','after:name');
t3lib_extMgm::addToAllTCAtypes('fe_users','--div--;LLL:EXT:mfwc_volunteer/locallang_db.xml:fe_users.mfwc_volunteer,
			tx_mfwcvolunteer_id, tx_mfwcvolunteer_status, tx_mfwcvolunteer_experience, tx_mfwcvolunteer_skills, tx_mfwcvolunteer_department, tx_mfwcvolunteer_jobs, tx_mfwcvolunteer_responsibilities',
			'','after:image');

/*
$TCA['tx_mfwcvolunteer_favorite'] = array(
	'ctrl' => array(
		'title'     => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:tx_mfwcvolunteer_favorite',		
		'label'     => 'uid',	
		'tstamp'    => 'tstamp',
		'crdate'    => 'crdate',
		'cruser_id' => 'cruser_id',
		'default_sortby' => 'ORDER BY crdate',	
		'delete' => 'deleted',	
		'enablecolumns' => array(		
			'disabled' => 'hidden',
		),
		'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
		'iconfile'          => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_mfwcvolunteer.gif',
	),
);
*/

$TCA['tx_mfwcvolunteer_departments'] = array(
	'ctrl' => array(
		'title'     => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:tx_mfwcvolunteer_departments',		
		'label'     => 'title',	
		'tstamp'    => 'tstamp',
		'crdate'    => 'crdate',
		'cruser_id' => 'cruser_id',
		'default_sortby' => 'ORDER BY crdate',	
		'delete' => 'deleted',	
		'enablecolumns' => array(		
			'disabled' => 'hidden',
		),
		'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
		'iconfile'          => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_mfwcvolunteer.gif',
	),
);

$TCA['tx_mfwcvolunteer_jobs'] = array(
	'ctrl' => array(
		'title'     => 'LLL:EXT:mfwc_volunteer/locallang_db.xml:tx_mfwcvolunteer_jobs',		
		'label'     => 'title',	
		'tstamp'    => 'tstamp',
		'crdate'    => 'crdate',
		'cruser_id' => 'cruser_id',
		'default_sortby' => 'ORDER BY crdate',	
		'delete' => 'deleted',	
		'enablecolumns' => array(		
			'disabled' => 'hidden',
		),
		'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
		'iconfile'          => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_mfwcvolunteer.gif',
	),
);


t3lib_div::loadTCA('tt_content');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1'] = 'layout,select_key,pages';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY.'_pi1']='pi_flexform';
t3lib_extMgm::addPiFlexFormValue($_EXTKEY.'_pi1', 'FILE:EXT:'.$_EXTKEY.'/pi1/flexform_ds.xml');
t3lib_extMgm::addPlugin(array(
	'LLL:EXT:mfwc_volunteer/locallang_db.xml:tt_content.list_type_pi1',
	$_EXTKEY . '_pi1',
	t3lib_extMgm::extRelPath($_EXTKEY) . 'ext_icon.gif'
),'list_type');


if (TYPO3_MODE === 'BE') {
	$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']['tx_mfwcvolunteer_pi1_wizicon'] = t3lib_extMgm::extPath($_EXTKEY) . 'pi1/class.tx_mfwcvolunteer_pi1_wizicon.php';
}
?>